<div class="modal-header">
    <h5 class="modal-title">负载均衡器</h5>
</div>

<div class="modal-body">

  <div class="form-group">
    <label class="col-sm-2 control-label">策略</label>
    <div class="col-sm-4">
      <select ng-model="order.lb.strategy" class="form-control">
        <option value="0">轮询</option>
        <option>最小负载</option>
        <option>IP Hash</option>
        <option>Cookie Hash</option>
      </select>
    </div>
  </div>

  <div class="form-group">
    <label class="col-sm-2 control-label">Real Server</label>
    <div class="col-sm-8">
      <table class="table table-bordered">
        <thead>
          <tr>
            <td>地址</td>
            <td>优先级</td>
            <td>操作</td>
          </tr>
        </thead>
        <tbody>
            
          <tr ng-repeat="s in order.lb.rs">
            <td>
              <input required ng-pattern="/^([0-9]{1,3}\.){3,3}[0-9]{1,3}$/" ng-maxlength="15" ng-model="s.address" type="text" class="form-control" >
            </td>

            <td>             
              <input required ng-maxlength="15" ng-model="s.priority" type="number" class="form-control" > 
            </td>      
            
            <td>
            <button type="button" ng-click="rmServer(s)" class="btn btn-danger btn-xs">删除</button>
            </td>
          </tr>
        </tbody>
      </table>
    </div>

    <!-- add button -->
    <p>
      <a ng-click="addServer()" class="button button-primary  button-square">
      <i class="fa fa-plus"></i></a>
    </p>
    <!-- add button -->
  </div>  
</div>
